//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.itheima.pinda.authority.dto.auth;

import com.itheima.pinda.authority.auth.utils.Token;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.List;

@ApiModel(
        value = "LoginDTO",
        description = "登录信息"
)
public class LoginDTO implements Serializable {
    private static final long serialVersionUID = -3124612657759050173L;
    @ApiModelProperty("用户信息")
    private UserDTO user;
    @ApiModelProperty("token")
    private Token token;
    @ApiModelProperty("权限列表")
    private List<String> permissionsList;

    public static LoginDTO.LoginDTOBuilder builder() {
        return new LoginDTO.LoginDTOBuilder();
    }

    public UserDTO getUser() {
        return this.user;
    }

    public Token getToken() {
        return this.token;
    }

    public List<String> getPermissionsList() {
        return this.permissionsList;
    }

    public LoginDTO setUser(final UserDTO user) {
        this.user = user;
        return this;
    }

    public LoginDTO setToken(final Token token) {
        this.token = token;
        return this;
    }

    public LoginDTO setPermissionsList(final List<String> permissionsList) {
        this.permissionsList = permissionsList;
        return this;
    }

    public LoginDTO() {
    }

    public LoginDTO(final UserDTO user, final Token token, final List<String> permissionsList) {
        this.user = user;
        this.token = token;
        this.permissionsList = permissionsList;
    }

    public String toString() {
        return "LoginDTO(super=" + super.toString() + ", user=" + this.getUser() + ", token=" + this.getToken() + ", permissionsList=" + this.getPermissionsList() + ")";
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof LoginDTO)) {
            return false;
        } else {
            LoginDTO other = (LoginDTO)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                label47: {
                    Object this$user = this.getUser();
                    Object other$user = other.getUser();
                    if (this$user == null) {
                        if (other$user == null) {
                            break label47;
                        }
                    } else if (this$user.equals(other$user)) {
                        break label47;
                    }

                    return false;
                }

                Object this$token = this.getToken();
                Object other$token = other.getToken();
                if (this$token == null) {
                    if (other$token != null) {
                        return false;
                    }
                } else if (!this$token.equals(other$token)) {
                    return false;
                }

                Object this$permissionsList = this.getPermissionsList();
                Object other$permissionsList = other.getPermissionsList();
                if (this$permissionsList == null) {
                    if (other$permissionsList != null) {
                        return false;
                    }
                } else if (!this$permissionsList.equals(other$permissionsList)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof LoginDTO;
    }

    public int hashCode() {
        boolean PRIME = true;
        int result = 1;
        Object $user = this.getUser();
        result = result * 59 + ($user == null ? 43 : $user.hashCode());
        Object $token = this.getToken();
        result = result * 59 + ($token == null ? 43 : $token.hashCode());
        Object $permissionsList = this.getPermissionsList();
        result = result * 59 + ($permissionsList == null ? 43 : $permissionsList.hashCode());
        return result;
    }

    public static class LoginDTOBuilder {
        private UserDTO user;
        private Token token;
        private List<String> permissionsList;

        LoginDTOBuilder() {
        }

        public LoginDTO.LoginDTOBuilder user(final UserDTO user) {
            this.user = user;
            return this;
        }

        public LoginDTO.LoginDTOBuilder token(final Token token) {
            this.token = token;
            return this;
        }

        public LoginDTO.LoginDTOBuilder permissionsList(final List<String> permissionsList) {
            this.permissionsList = permissionsList;
            return this;
        }

        public LoginDTO build() {
            return new LoginDTO(this.user, this.token, this.permissionsList);
        }

        public String toString() {
            return "LoginDTO.LoginDTOBuilder(user=" + this.user + ", token=" + this.token + ", permissionsList=" + this.permissionsList + ")";
        }
    }
}
